Repository navigation
Conversation
Contributor
Author
|
@Birfy review request — tip This is a T2 change, so it needs your
One request for this tip; no new commits will be pushed under it. |
added 2 commits
November 11, 2026 11:07
…FlowLab#2855) `takeLineSeq` reserved a remote line number by moving `room.seq`, but a reservation writes no line: the room read subtracted the retained log from that counter, so each co-seat mention printed one phantom line as dropped (`newest 5 of 6` on a five-line log) and the count only grew. The reservation now keeps its own counter, `room.shareSeq`, starting above everything already said; `room.seq` still counts written lines only, so the trimmed-room total is right again and a second mention still gets a new number. Written-by: Dev-3 Bot: Dev-3
…#2855) The page said the reservation advances `room.seq` the way a stored line does; it now keeps `room.shareSeq`, because a reservation writes no line and the room read would report it as a dropped one. Written-by: Dev-3 Bot: Dev-3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2855
Owner: Dev-3
Reviewer: Birfy
Written-by: Dev-3
Bot: Dev-3
Claim-Id: 1c8863ae0c9846ea917e3eb9dcd99282
Risk tier: T2
Base: bdaff4f
Tip: 72276f3
Tree: 4fa3f6add7fe2cf1de7d02699ae1492d86a39b42
What changed
A regression
#2839introduced. That fix maderead_group_chatcount a trimmed log honestly: the total iskept.lengthplusroom.seq - room.log.length, which reads "every seq number above the retained window was a line the cap dropped".takeLineSeqbroke that premise: it reserved a remote line number for a co-seat mention by movingroom.seqand wrote no line, so each reservation looked like a dropped line and the header grew one phantom row per mention — a five-line log saidnewest 5 of 6, oldest firstafter one reservation and still showed all five.The reservation now keeps its own counter,
room.shareSeq, which starts above everything already said and is neverroom.seq;room.seqkeeps its meaning (one per written line), so the trimmed-room total is right again.#1126is unchanged in what it needs — a second mention still gets a new number, so its envelope is a new remote line instead of a redelivery of seq 0.docs/subsystems/core-host.mdrecords the reservation rule anddocs/subsystems/plugin-runtime.md(owner ofhooks.js) corrects thetakeLineSeqsentence.Red first (base bdaff4f, test-only tree)
core/test/room-read-trimmed-count.test.js— five lines, onetakeLineSeqreservation, then the same read:Two runs, normalized only for
duration_msand the random/tmp/ds-bot-p684-*home directory, are byte-identical (cmpclean).Ran
The 3 red tests in the full suite are red on base
bdaff4fbby the same commands:bench-preflightrefuse/install (pnpmabsent on this box) andthinking-row#1718('min(560px, 78%)'vs'min(560px,78%)'); 16/19 pass in those two files on the base.Not run
Plugin suites (no
plugins/**change) and the rootnpm run verify; smoke bench (noindex.js/src/host/**smoke surface —hooks.jsonly, but see Ran for the host suite).Generated
generaterewrotepatches/ds-bot/files/src/host/hooks.jsandpatches/ds-bot/files/test/room-read-trimmed-count.test.js(both are whole-file mirrors;hooks.jsis a FlyBot-added file, so no*.patchchanged).patches checkreportscore/ equals ds-bot/ + patches/ds-bot/.Risk tier
risk-tier: T2; basis: core/src/host/hooks.js=T2, changelog.d/2855-room-read-take-line-seq.fixed.md=T1, core/test/room-read-trimmed-count.test.js=T1, patches/ds-bot/files/src/host/hooks.js=T1, patches/ds-bot/files/test/room-read-trimmed-count.test.js=T1, docs/subsystems/core-host.md=T0, docs/subsystems/plugin-runtime.md=T0T2 because of the
core/src/host/hooks.jspath, computed by the base copy ofrisk-gate.mjsand.github/agent/risk-rules.json; no gate file changed, so noPolicy-sign:line.Checkpoint
{"pr":2863,"claim":"Dev-3","issue":2855,"summary":"read_group_chat counted a share-seq reservation as a line the room said, so a co-seat mention that wrote no line printed one phantom dropped line and the count grew per mention. takeLineSeq now keeps room.shareSeq, starting above everything already said, and never moves room.seq, which still counts written lines only. A five-line log therefore reads byte-identically before and after a reservation, a second mention still gets a new number, and a room whose log really was trimmed still reports what the cap dropped. Tests pin both on the real runtime.","files":["core/src/host/hooks.js","core/test/room-read-trimmed-count.test.js","docs/subsystems/core-host.md","docs/subsystems/plugin-runtime.md","changelog.d/2855-room-read-take-line-seq.fixed.md","patches/ds-bot/files/src/host/hooks.js","patches/ds-bot/files/test/room-read-trimmed-count.test.js"],"checks":{"ran":"node --import ./test/harness-resolve.mjs --test test/room-read-trimmed-count.test.js","result":"green","at":"72276f3ef224fbea0de1fa3df5fe4f5956f49629"},"next":"none — ready for review"}